package com.x.Part4_抽象类;

/**
 * ClassName: Student
 * Package: IntelliJ IDEA
 * Description:
 * Written by HanXu
 * Create 2024.03.04 1:37
 */
public class Student extends Person{
    String school;

    public Student() {
    }

    public Student(String name, String school) {
        super(name);
        this.school = school;
    }

    //抽象方法的重写叫implements method
    @Override
    public void eat() {
        System.out.println("学生吃饭");
    }

    @Override
    public void sleep() {
        System.out.println("学生睡觉");
    }
}
